package com.example;

import java.io.Serializable;
import java.sql.Timestamp;

public class UserPurchase implements Serializable {
    private static final long serialVersionUID = 1L;

    private String userId;
    private String orderId;
    private double amount;
    private Timestamp purchaseTime;

    public UserPurchase() {}

    public UserPurchase(String userId, String orderId, double amount, Timestamp purchaseTime) {
        this.userId = userId;
        this.orderId = orderId;
        this.amount = amount;
        this.purchaseTime = purchaseTime;
    }

    // Getters and setters
    public String getUserId() { return userId; }
    public void setUserId(String userId) { this.userId = userId; }

    public String getOrderId() { return orderId; }
    public void setOrderId(String orderId) { this.orderId = orderId; }

    public double getAmount() { return amount; }
    public void setAmount(double amount) { this.amount = amount; }

    public Timestamp getPurchaseTime() { return purchaseTime; }
    public void setPurchaseTime(Timestamp purchaseTime) { this.purchaseTime = purchaseTime; }

    @Override
    public String toString() {
        return "UserPurchase{" +
                "userId='" + userId + '\'' +
                ", orderId='" + orderId + '\'' +
                ", amount=" + amount +
                ", purchaseTime=" + purchaseTime +
                '}';
    }
}